#if !defined(_SCHAR_H)
#define _SCHAR_H

#include "SSimpleValue.h"
#include <boost/regex.hpp>

CREATE_ALIAS( SChar )

/**
 *   Class used to store a char value.
 */
class DECLARATION_DLL SChar : public SSimpleValue
{
	/** The char value. */
	char value;

	/**
	 *   Create a SChar variable with a specific value.
	 */
	SChar(char value)
	{
		Set(value);
	}

	public:

		/**
		 * Get the variable type.
		 */
		virtual SType GetType() const
		{
			return STypeChar;
		}

		/**
		 *   Set the char value.
		 */
		virtual void Set(char value) 
		{ 
			this->value = value;
		}
		
		/**
		 *   Get the char value.
		 */
		virtual char Get() 
		{ 
			return value; 
		}

		/**
		 * Returns a string representation of the value.
		 */
		virtual string ToString()
		{
			return SSimpleValue::ToString();
		}

		/**
		 * Returns a string representation of the value in a specific format.
		 */
		virtual string ToString(string format);

		/**
		 *   Factory method to create a SChar variable.
		 */
		static SCharSp Create(char value);

		/**
		 *   Factory method to create a SChar variable from a string.
		 */
		static SCharSp Parse(string s);
};

#endif  //_SCHAR_H
